package 外观模式;

//所谓外观模式就是提供一个统一的接口，用来访问子系统中的一群接口。
//在引入外观模式后，客户只需要与外观角色打交道，客户与子系统的复杂关系有外观角色来实现，从而降低了系统的耦合度。
public class MainClass {
	public static void main(String[] args) throws Exception {
		AirCondition airCondition = new AirCondition();
		Light light = new Light();
		Television television = new Television();
		Screen screen = new Screen();
		WatchTvSwtichFacade watchTvSwtichFacade = new WatchTvSwtichFacade(
				airCondition, light, television, screen);

		watchTvSwtichFacade.on();
		System.out.println("--------------可以看电视了.........");
		watchTvSwtichFacade.off();
		System.out.println("--------------可以睡觉了...........");
	}
}
